package io.geekidea.springbootplus.system.entity;

//商品评价

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "SysComment对象", description = "商品评价")
public class SysComment extends BaseEntity {

    private static final long serialVersionUID = 8574876736945722908L;

    @ApiModelProperty("自动编号")
    @TableId(value = "id", type = IdType.AUTO)
    @NotBlank(message = "主键，自增列")
    private Integer id;

    @ApiModelProperty("商品编号")
    private Integer productId;

    @ApiModelProperty("订单编号")
    private Integer orderId;

    @ApiModelProperty("商品名称")
    private String productName;

    @ApiModelProperty("评论人")
    private String nickName;

    @ApiModelProperty("评论时间")
    private LocalDateTime createTime;

    @ApiModelProperty("评价星数")
    private Integer stars;

    @ApiModelProperty("评价内容")
    private String content;

    @ApiModelProperty("上传图片地址")
    private String picUrl;

    @ApiModelProperty("上传视频地址")
    private String videoUrl;

}
